﻿#include "cameraconfigadd.h"
#include "ui_cameraconfigadd.h"
#include <QDebug>
#include<QPushButton>
CameraConfigAdd::CameraConfigAdd(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::CameraConfigAdd)
{
    ui->setupUi(this);

    ui->buttonBox->button(QDialogButtonBox::Ok)->setText("确定");
    ui->buttonBox->button(QDialogButtonBox::Cancel)->setText("取消");
}

CameraConfigAdd::~CameraConfigAdd()
{
    delete ui;
}


void CameraConfigAdd::on_buttonBox_clicked(QAbstractButton *button)
{
    if(button == static_cast<QAbstractButton *>(ui->buttonBox->button(QDialogButtonBox::Ok)))
        {
            this->close();
        }
        else if(button == ui->buttonBox->button(QDialogButtonBox::Cancel))
        {
           // qDebug() << R"(Button "Cancle" has been clicked.)";
            this->close();
        }
}
